<template>
  <div>
    <ul>
      <li
        v-for="item in post"
        :key="item.id"
      >
        {{item.title}}
      </li>
    </ul>
  </div>
</template>
<script>
import axios from 'axios'
export default {
  data () {
    return {
      post: [],
      title: ''
    }
  },
  async created () {
    const { data } = await axios({
      method: 'GET',
      url: '/data.json'
    })
    // console.log(data)
    this.post = data.posts
    this.title = data.title
  }
}
</script>
<style>

</style>
